package org.springblade.modules.admin.controller.suger;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springblade.core.tool.api.R;
import org.springblade.modules.admin.dto.sugar.SugarSearchDTO;
import org.springblade.modules.admin.service.suger.SugerSignAndContractService;
import org.springblade.modules.admin.vo.sugar.SugerContractVo;
import org.springblade.modules.admin.vo.sugar.SugerSignDetailVo;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author zcc
 * @version 1.0
 * @date 2022/10/11 8:53
 */
@RestController
@RequestMapping("/admin/sugar")
@AllArgsConstructor
@Api(value = "数据大屏管理", tags = "数据大屏管理")
public class SugerSignAndContractController {

	private final SugerSignAndContractService sugerSignAndContractService;

	@PostMapping("/getSugerSignDetail")
	@ApiOperation("获取考勤明细")
	R<SugerSignDetailVo> getSugerSignDetail(@RequestBody SugarSearchDTO searchDTO) {
		return R.data(sugerSignAndContractService.getSugerSignDetail(searchDTO));
	}


	@GetMapping("/getContractDetail")
	@ApiOperation("获取合同信息")
	R<List<SugerContractVo>> getContractDetail() {
		return R.data(sugerSignAndContractService.getContractDetail());
	}
}
